import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.StringWriter;

public class IOTest {

	public static void main(String[] args) throws Exception {

		InputStream in = new BufferedInputStream(new  FileInputStream("c:/images/image3.ant"));
		StringWriter stringWriter = new StringWriter();
		
		int b = 0;
		while ((b=in.read()) != -1) {
			stringWriter.write(b);
		}
		
		System.out.println("*** file content: \n" + stringWriter.toString());
	} 

}
